package com.teamin;

import com.teamin.web.appListener.*;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.web.servlet.ServletComponentScan;
import org.springframework.transaction.annotation.EnableTransactionManagement;

@EnableTransactionManagement
@SpringBootApplication
@ServletComponentScan(value = {"com.teamin.web.filter"})
@MapperScan("com.teamin.mapper")
public class Application {

    public static void main(String[] args) {
        SpringApplication app = new SpringApplication(Application.class);
        app.addListeners(new SessionConnectedListener());
        app.addListeners(new SessionConnectListener());
        app.addListeners(new SessionDisconnectListener());
        app.addListeners(new SessionSubscribeListener());
        app.addListeners(new SessionUnsubscribeListener());
        app.addListeners(new BrokerAvailabilityListener());
        app.run(args);
    }
}
